package com.project.finance.common.po;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/*
* 借贷订单表
*
*/
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Table(name="tb_debit_order")
public class TbDebitOrder {

    @Id
    @Column(name="debit_order_id")  //如果属性和字段名相符，则此注解可以省略
    @GeneratedValue(strategy = GenerationType.IDENTITY)  //主键策略
    private Integer debitOrderId;

    private Integer userId;

    private Integer debitAmount;

    private Integer debitLimit;

    private Integer ratesId;

    private BigDecimal surplusAmount;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss",iso= DateTimeFormat.ISO.DATE_TIME)
    private Date debitDate;

    private Integer surplusNumber;

    private TbUsers tbUsers;

    private TbVerify tbVerify;

    private TbRates tbRates;

    public Integer getDebitOrderId() {
        return debitOrderId;
    }

    public void setDebitOrderId(Integer debitOrderId) {
        this.debitOrderId = debitOrderId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getDebitAmount() {
        return debitAmount;
    }

    public void setDebitAmount(Integer debitAmount) {
        this.debitAmount = debitAmount;
    }

    public Integer getDebitLimit() {
        return debitLimit;
    }

    public void setDebitLimit(Integer debitLimit) {
        this.debitLimit = debitLimit;
    }

    public Integer getRatesId() {
        return ratesId;
    }

    public void setRatesId(Integer ratesId) {
        this.ratesId = ratesId;
    }

    public BigDecimal getSurplusAmount() {
        return surplusAmount;
    }

    public void setSurplusAmount(BigDecimal surplusAmount) {
        this.surplusAmount = surplusAmount;
    }

    public Date getDebitDate() {
        return debitDate;
    }

    public void setDebitDate(Date debitDate) {
        this.debitDate = debitDate;
    }

    public Integer getSurplusNumber() {
        return surplusNumber;
    }

    public void setSurplusNumber(Integer surplusNumber) {
        this.surplusNumber = surplusNumber;
    }

    public TbUsers getTbUsers() {
        return tbUsers;
    }

    public void setTbUsers(TbUsers tbUsers) {
        this.tbUsers = tbUsers;
    }

    public TbVerify getTbVerify() {
        return tbVerify;
    }

    public void setTbVerify(TbVerify tbVerify) {
        this.tbVerify = tbVerify;
    }

    public TbRates getTbRates() {
        return tbRates;
    }

    public void setTbRates(TbRates tbRates) {
        this.tbRates = tbRates;
    }
}